#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
using namespace std;
int a[3];
int main()
{
	while (1)
	{
		string s;
		getline(cin, s);
		if (s == "e/o/i")
		{
			break;
		}
		memset(a, 0, sizeof(a));
		int j = 0;
		for (int i = 0; i < s.size(); i++)
		{
			if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u' || s[i] == 'y')
			{
				if (s[i - 1] != 'a' && s[i - 1] != 'e' && s[i - 1] != 'i' && s[i - 1] != 'o' && s[i - 1] != 'u' && s[i - 1] != 'y') // 抄博友程序
				{
					// cout<<s[i]<<" ";
					a[j]++;
				}
			}
			else if (s[i] == '/')
			{
				// cout<<"*******";
				j++;
			}
		}
		// cout<<endl;
		// cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<endl;
		if (a[0] == 5 && a[1] == 7 && a[2] == 5)
		{
			cout << "Y" << endl;
		}
		else if (a[0] != 5)
		{
			cout << 1 << endl;
		}
		else if (a[1] != 7)
		{
			cout << 2 << endl;
		}
		else if (a[2] != 5)
		{
			cout << 3 << endl;
		}
	}
	return 0;
}